package com.easy.query.test.entity.proxy;

import com.easy.query.core.expression.parser.core.available.TableAvailable;
import com.easy.query.core.proxy.AbstractProxyEntity;
import com.easy.query.core.proxy.ProxyEntity;
import com.easy.query.core.proxy.SQLColumn;
import com.easy.query.core.proxy.SQLSelectAsExpression;
import com.easy.query.core.proxy.fetcher.AbstractFetcher;
import com.easy.query.core.proxy.core.EntitySQLContext;
import com.easy.query.test.entity.TopicFile;
import com.easy.query.core.proxy.columns.types.SQLStringTypeColumn;
import com.easy.query.core.proxy.columns.types.SQLIntegerTypeColumn;
import com.easy.query.core.proxy.columns.types.SQLLocalDateTimeTypeColumn;

/**
 * this file automatically generated by easy-query, don't modify it
 * 当前文件是easy-query自动生成的请不要随意修改
 * 如果出现属性冲突请使用@ProxyProperty进行重命名
 *
 * @author easy-query
 */
public class TopicFileProxy extends AbstractProxyEntity<TopicFileProxy, TopicFile> {

    private static final Class<TopicFile> entityClass = TopicFile.class;

    public static final TopicFileProxy TABLE = createTable().createEmpty();

    public static TopicFileProxy createTable() {
        return new TopicFileProxy();
    }

    public TopicFileProxy() {
    }

    /**
     * {@link TopicFile#getId}
     */
    public SQLStringTypeColumn<TopicFileProxy> id() {
        return getStringTypeColumn("id");
    }

    /**
     * {@link TopicFile#getStars}
     */
    public SQLIntegerTypeColumn<TopicFileProxy> stars() {
        return getIntegerTypeColumn("stars");
    }

    /**
     * {@link TopicFile#getTitle}
     */
    public SQLStringTypeColumn<TopicFileProxy> title() {
        return getStringTypeColumn("title");
    }

    /**
     * {@link TopicFile#getCreateTime}
     */
    public SQLLocalDateTimeTypeColumn<TopicFileProxy> createTime() {
        return getLocalDateTimeTypeColumn("createTime");
    }

    /**
     * {@link TopicFile#getAlias}
     */
    public SQLStringTypeColumn<TopicFileProxy> alias() {
        return getStringTypeColumn("alias");
    }


    @Override
    public Class<TopicFile> getEntityClass() {
        return entityClass;
    }


    /**
     * 数据库列的简单获取
     *
     * @return
     */
    public TopicFileProxyFetcher FETCHER = new TopicFileProxyFetcher(this, null, SQLSelectAsExpression.empty);


    public static class TopicFileProxyFetcher extends AbstractFetcher<TopicFileProxy, TopicFile, TopicFileProxyFetcher>  {

        public TopicFileProxyFetcher(TopicFileProxy proxy, TopicFileProxyFetcher prev, SQLSelectAsExpression sqlSelectAsExpression) {
            super(proxy, prev, sqlSelectAsExpression);
        }


        /**
         * {@link TopicFile#getId}
         */
        public TopicFileProxyFetcher id() {
            return add(getProxy().id());
        }

        /**
         * {@link TopicFile#getStars}
         */
        public TopicFileProxyFetcher stars() {
            return add(getProxy().stars());
        }

        /**
         * {@link TopicFile#getTitle}
         */
        public TopicFileProxyFetcher title() {
            return add(getProxy().title());
        }

        /**
         * {@link TopicFile#getCreateTime}
         */
        public TopicFileProxyFetcher createTime() {
            return add(getProxy().createTime());
        }

        /**
         * {@link TopicFile#getAlias}
         */
        public TopicFileProxyFetcher alias() {
            return add(getProxy().alias());
        }


        @Override
        protected TopicFileProxyFetcher createFetcher(TopicFileProxy cp, AbstractFetcher<TopicFileProxy, TopicFile, TopicFileProxyFetcher> prev, SQLSelectAsExpression sqlSelectExpression) {
            return new TopicFileProxyFetcher(cp, this, sqlSelectExpression);
        }
    }

}
